%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Contents: style file of kc
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% kcthesis.sty - ken ccao's thesis style
%
%                                                      by Cao, Chen
%                                                     ken.ccao@gmail.com
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%   Copyright 2009 Cao, Chen <ken.ccao@gmail.com>
% 
%   This document is free; you can redistribute it and/or modify it
%   under the terms of the GNU General Public License as published by
%   the Free Software Foundation; either version 2 of the License, or
%   (at your option) any later version.
% 
%   This document is distributed in the hope that it will be useful, but
%   WITHOUT ANY WARRANTY; without even the implied warranty of
%   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
%   General Public License for more details.
% 
%   You should have received a copy of the GNU General Public License
%   along with this document; if not, write to the Free Software
%   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% meta info
\def\filedate{2009/05/01}
\def\fileversion{0.01}
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
\ProvidesPackage{kcdoc}[\filedate\space\fileversion\space]


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% packages
%
\usepackage{ifpdf}
\ifpdf
  \usepackage[pdftex]{graphicx}
  \graphicspath{{fig/}}
\else
  \RequirePackage[dvipdfm,%
	unicode,%
	colorlinks,%
	linkcolor=blue,%
	hyperindex,%
	plainpages=false,%
	pdfstartview=FitH]{hyperref}
  \AtBeginDvi{\special{pdf:tounicode UTF8-UCS2}}
  \usepackage[dvipdfm]{graphicx}
  \graphicspath{{fig/}}
  \DeclareGraphicsExtensions{.eps}
\fi
%
%
\RequirePackage{CJKutf8,CJKnumb,CJKulem}
\RequirePackage{color,verbatim,cite}
\RequirePackage{texnames,makeidx,indentfirst}
\RequirePackage{amsmath,amssymb,amsfonts,bm,manfnt}
\RequirePackage{fancyhdr,titlesec,datetime}
\RequirePackage{wasysym,fancyvrb,longtable,multirow,bigstrut}
\usepackage[section]{placeins}
\usepackage[left=35mm,right=25mm,top=30mm,bottom=25mm]{geometry}
%\usepackage[%paperwidth=18.4cm, paperheight= 26cm,
%            body={14.6true cm,22.0true cm},
%            twosideshift=0 pt,
%            %headheight=1.0true cm
%            ]{geometry}
\usepackage[caption=false,font=footnotesize]{subfig}

% use CJK as default environment
\AtBeginDocument{\begin{CJK*}{UTF8}{gbsn}\CJKtilde\CJKindent\CJKcaption{utf8}}
\AtEndDocument{\clearpage\end{CJK*}}

% CJKcaption
%\renewcommand\chaptername{\CJKprechaptername\CJKthechapter\CJKchaptername}

\renewcommand\figurename{图}
\renewcommand\indexname{索引}
\renewcommand\tablename{表}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%\bibliographystyle{plain}
\bibliographystyle{unsrt}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% appendix
%\usepackage{appendix}


% control toc
%
%\usepackage{titletoc}
%\dottedcontents{chapter}[0.0em]{}{0.0em}{7pt}
%\dottedcontents{section}[1.16cm]{}{1.8em}{5pt}
%\dottedcontents{subsection}[2.00cm]{}{2.7em}{5pt}
%\dottedcontents{subsubsection}[2.86cm]{}{3.4em}{5pt}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% other styles
%
\setlength{\parskip}{0.75ex plus .2ex minus .5ex}
%\renewcommand{\baselinestretch}{1.2}

% use superscript numerical citation with brackets
\def\@cite#1{\textsuperscript{[#1]}}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Redefine some commands and environments
%
%\newenvironment{lined}[1]%
% {\begin{center}\begin{minipage}{#1}\hrule\medskip}
% {\vspace{-1ex}\hrule \end{minipage}\end{center}}

% Marginal notes
%\newcommand{\MarginalNotes}[1]{%
%   \hskip 1sp \marginpar{\small\sffamily\raggedright #1}}
%
%\DefineVerbatimEnvironment%
%{Codefrag}{Verbatim}
%{fontfamily=tt,fontsize=\footnotesize,frame=lines, framerule=0.4mm, numbers=left, numbersep=3pt, tabsize=4}

%\DefineVerbatimEnvironment%
%{Command}{Verbatim}
%{fontfamily=tt,fontsize=\footnotesize, xleftmargin=2em, frame=none, numbers=none}


\newcommand{\BOXED}[2]
{
  \noindent\begin{center}\fbox{
  \begin{minipage}[c]{#1}{#2}\end{minipage}
  }\end{center}
}

\newcommand{\FIG}[3]
{
    \noindent\begin{figure}[htbp]
	\centering
    \includegraphics[width=#3,keepaspectratio]{#2}
    \caption{\label{#2}#1}
    \end{figure}
}
%\makeatletter
%\newcommand\figcaption{\def\@captype{figure}\caption}
%\newcommand\codecaption{\def\@captype{figure}\caption}
%\newcommand\tabcaption{\def\@captype{table}\caption}
%\makeatother

\newcommand{\FIGFIX}[4]
{
    \begin{figure}[h]
    \centering
    \includegraphics[totalheight=#3]{#2}
    \caption{#1} \label{#4}
    \end{figure}
}

%\renewcommand{\textfraction}{0.15}
%\renewcommand{\topfraction}{0.85}
%\renewcommand{\bottomfraction}{0.65}
%\renewcommand{\floatpagefraction}{0.60}


\endinput
%%
%% End of file


